package com.guguskins.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-06-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_roll_goods")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class GuRollGoods extends Model<GuRollGoods> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "rg_id", type = IdType.AUTO)
    private Long rgId;

    /**
     * roll房id
     */
    private Long rgRollId;

    /**
     * 库存id
     */
    private Long rgInventoryId;

    /**
     * 饰品id
     */
    private Long rgGoodsId;

    /**
     * 用户id
     */
//    private Long rgUserId;

    /**
     * steamId
     */
//    private String rgSteamId;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime rgCreateTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime rgUpdateTime;

    @TableField(exist = false)
    private GuGoods goods;

    /**
     * 饰品名
     */
    @TableField(exist = false)
    private String goodsName;


    /**
     * 同一id
     */
    @TableField(exist = false)
    private String goodsSameId;

    /**
     * 简称
     */
    @TableField(exist = false)
    private String goodsShortName;


    /**
     * 平台价格（咕币）
     */
    @TableField(exist = false)
    private BigDecimal goodsPrice;

    /**
     * icon图片
     */
    @TableField(exist = false)
    private String goodsIconUrl;

    /**
     * 原始icon图片
     */
    @TableField(exist = false)
    private String goodsOriginalIconUrl;

    /**
     * 等级
     */
    @TableField(exist = false)
    private Integer goodsLevel;

    @Override
    protected Serializable pkVal() {
        return this.rgId;
    }

}
